1. Field of the Invention
This invention relates to the field of data processing systems. More particularly, this invention relates to mapping program instructions from a list of program instructions into a memory address space to form an executable program.
2. Description of the Prior Art
It is known to generate computer programs in a form in which they can be automatically compiled to form an executable program image. During compilation the computer programs are mapped to memory addresses with branch targets, jump targets and the like being dynamically calculated with appropriate instruction modifications such that the computer program as a whole will execute correctly. Typically, although not always, such computer programs are laid down to form a contiguous program image within the memory space.
Compilers for use in accordance with the above rely upon the computer programs they are to compile being represented in a symbolic and abstract manner, such as assembly language code, such that the compiler can interpret the symbolic representation of the program to generate binary executable program instructions to be stored in the memory. Abstract program representations, such as assembly language, are also easier for most humans writing computer programs to understand and manipulate.
It is also known to produce test programs for the purpose of testing data processing systems by causing them to adopt a broad range of functional states. Such testing can be done for design verification, manufacturing test or other reasons. Such a test program will typically be run or simulated and then the final result compared with an expected result to see if the circuit is behaving as anticipated. The requirements for a test program to execute so as to move the system through a broad range of its possible states places different requirements on the program instructions than are normal. In particular, symbolic representations of the computer program to be used as a test are not really useful since depending upon how these will compile into an executable image the states between which the system will move will vary considerably. One compilation of such a program may produce a suitable test whereas another compilation may not test sufficiently. For this reason, test programs may more desirably be formed in a more specific form in which the various operand values are determined rather than being dynamically selected during compilation. Such programs will behave more predictably and so generate more predictable test behaviour. However, a problem arises in producing executable programs from such test program instructions since a compiler is no longer used and able to deal with the problem of laying out the program instructions into memory and adjusting branches and jumps so that the correct program flow is maintained. This problem is made worse in situations in which it is possible to load the program counter value as this increases the ways in which the program flow can jump and makes such jumps data dependent, e.g. a value is calculated by one instruction and then loaded to the program counter resulting in a jump to the calculated address.